package STUDENT.TRINHQUANGXUANDUC.OPPS.baitapmang.bai6;

public class Models {
	/***
	 * Nghiep vu sap xep sinh vien
	 * 
	 * @param arrayobj
	 * @return
	 */
	public Student[] sortHS(Student[] arrayobj) {
		Student[] objTemp = new Student[arrayobj.length];
		System.arraycopy(arrayobj, 0, objTemp, 0, arrayobj.length);
		for (int i = 0; i < arrayobj.length; i++) {
			for (int j = i + 1; j < objTemp.length; j++) {
				if (objTemp[i].getMark() > objTemp[j].getMark()) {
					Student temp = objTemp[i];
					objTemp[i] = objTemp[j];
					objTemp[j] = temp;
				}
			}
		}
		return objTemp;
	}
}
